﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UserRegister.aspx.cs" Inherits="PageUserRegister_UserRegister" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>會員註冊</title>
    <script src="Scripts/jquery-2.1.1.js"></script>
    <script type="text/javascript">
        //驗證沒輸入帳號
        function IsValid(args) {
            if (args.value.length == 0) {
                return false;
            }
            else {
                return true;
            }
        }


    </script>


    <link rel="shortcut icon" href="images/uboxiconR-03.ico"/>  
    <style>
        .login-link {
            float: right;
            color: #ff0000;
            text-decoration: none;
            margin-top: 32px;
        }

            .login-link:hover {
                color: #3399f3;
                /*color: #2e52f8;*/
                text-decoration: none;
            }

        .right-btn {
            float: right;
            padding-left: 22px;
            display: inline-block;
            width: 140px;
        }

        @media screen and (max-width: 481px) {
            .right-btn {
                display: inline;
                float: left;
                padding-left: 0px;
            }
            .user-register-content {
                display:inline;
                /*height:100%;*/
            }
        }
    </style>
    <script>
        $(function () {
            $("#Demo").click(function () {
                $("#txtAccount").val("Ubox1000!");
                $("#txtPassword").val("Ubox1234");
                $("#txtPasswordConfirm").val("Ubox1234");
                $("#txtFirstName").val("阿!");
                $("#txtLastName").val("U!");
                $("#txtPhone").val("091088877$");
                $("#txtEmail").val("Ubox@@gmail.com");
            });
        })
    </script>
</head>
<body>
    <form id="form" runat="server">
    <div class="container">
        <div class="user-register-container">
            <div class="user-register-content">
                <div class="register-logo">
                    <input type="button" id="Demo" class="btn btn-danger" value="Demo"/>
                    <a href="index.aspx"><img src="images/ubox.svg" title="回首頁"/></a>
                    <a href="index.aspx" id="lnkForgotPwd" class="login-link" title="回首頁"><i class="glyphicon glyphicon-home"></i>&nbsp;回首頁</a>
                    
                </div>
                <div class="panel-heading">
                    <h4>&nbsp;<i class="glyphicon glyphicon-pencil"></i>&nbsp;<strong>會員註冊</strong></h4>
                </div>
                <div class="register-id">
                    <label>
                    <i class="glyphicon glyphicon-user"></i>&nbsp;&nbsp;帳號<asp:Label ID="Label12" runat="server" Text="限制英數字-8~20字元"></asp:Label>
                    </label>&nbsp;&nbsp;&nbsp;&nbsp;<asp:Label ID="Label15" runat="server" Font-Bold="True" ForeColor="#CC0000"></asp:Label>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtAccount" ErrorMessage="請輸入資料" ForeColor="#CC0000" Font-Bold="True" Display="Dynamic"></asp:RequiredFieldValidator>
&nbsp;<asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" ControlToValidate="txtAccount" ErrorMessage="(格式不符)" ForeColor="Red" ValidationExpression="^\w[\w\d_]{7,20}$" Font-Bold="True" Display="Dynamic" ValidationGroup="Group1"></asp:RegularExpressionValidator>
                   
                    <asp:TextBox ID="txtAccount" runat="server" CssClass="form-control" AutoPostBack="True"  OnTextChanged="txtAccount_TextChanged" placeholder="請輸入 帳號" title="請輸入帳號" ValidationGroup="Group1" CausesValidation="True"  ></asp:TextBox>
                    
                </div>             
                <div class="register-password">
                    <div>
                        <label><i class="glyphicon glyphicon-lock"></i>&nbsp;&nbsp;密碼<asp:Label ID="Label11" runat="server" Text="至少有一個數字，至少有一個大寫字母，以及小寫英文字母，字串長度在 8 ~ 20 個字母之間"></asp:Label>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="txtPassword" ErrorMessage="請輸入資料" ForeColor="#CC0000" Display="Dynamic"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" ControlToValidate="txtPassword" Display="Dynamic" ErrorMessage="(格式不符)" ForeColor="Red" ValidationExpression="^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{7,20}$" Font-Bold="True"></asp:RegularExpressionValidator>
                        </label><asp:TextBox ID="txtPassword" runat="server" CssClass="form-control" TextMode="Password" placeholder="請輸入 密碼" title="請輸入密碼"></asp:TextBox>                        
                    </div>
                    <br />
                     <div>
                        <label>確認密碼</label>
                         <asp:TextBox ID="txtPasswordConfirm" runat="server" CssClass="form-control" TextMode="Password" placeholder="請再打一次密碼" title="請再次輸入一次密碼"></asp:TextBox>
                    </div>
                </div>
                <div class="register-name">
                    
                    <strong><asp:Label ID="Label2" runat="server" Text="姓氏"></asp:Label></strong>
                    <small><asp:Label ID="Label13" runat="server" Text="請輸入中文或英文"></asp:Label></small>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtFirstName" ErrorMessage="請輸入資料" ForeColor="#CC0000" Font-Bold="True" Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtFirstName" Display="Dynamic" ErrorMessage="(格式不符)" ForeColor="Red" ValidationExpression="^[A-Za-z\u4E00-\u9FA5\uF900-\uFA2D]+$" Font-Bold="True"></asp:RegularExpressionValidator>
                    <asp:TextBox ID="txtFirstName" runat="server" CssClass="form-control" placeholder="姓" title="請輸入姓"></asp:TextBox>
                    <br />
                    <br />
                    <strong><asp:Label ID="Label3" runat="server" Text="名字"></asp:Label></strong>
                    <small><asp:Label ID="Label14" runat="server" Text="請輸入中文或英文"></asp:Label></small>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtLastName" ErrorMessage="請輸入資料" ForeColor="#CC0000" Font-Bold="True" Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="txtLastName" Display="Dynamic" ErrorMessage="(格式不符)" ForeColor="Red" ValidationExpression="^[A-Za-z\u4E00-\u9FA5\uF900-\uFA2D]+$" Font-Bold="True"></asp:RegularExpressionValidator>
                    <asp:TextBox ID="txtLastName" runat="server" CssClass="form-control" placeholder="名" title="請輸入名"></asp:TextBox>                 
                </div>
                <div class="register-sex">
                    <strong><label>性別</label></strong>
                     <asp:RadioButton ID="optMan" runat="server" Checked="True" Text="男" GroupName="Sex" />
                     <asp:RadioButton ID="optWoman" runat="server" Text="女" GroupName="Sex" />                   
                </div>
                <div class="register-birthday">
                    <label>生日</label>
                      <asp:DropDownList ID="cboYear" runat="server" AutoPostBack="True" OnSelectedIndexChanged="cboYear_SelectedIndexChanged">
                      </asp:DropDownList>
                      <asp:DropDownList ID="cboMonth" runat="server" AutoPostBack="True" OnSelectedIndexChanged="cboMonth_SelectedIndexChanged">
                      </asp:DropDownList>
                      <asp:DropDownList ID="cboDay" runat="server" AutoPostBack="True">
                      </asp:DropDownList>
                </div>
                <div class="register-mobile">
                    <label><i class="glyphicon glyphicon-phone"></i>&nbsp;&nbsp;手機號碼</label><asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtPhone" ErrorMessage="請輸入資料" ForeColor="#CC0000" Font-Bold="True" Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator7" runat="server" ControlToValidate="txtPhone" Display="Dynamic" ErrorMessage="(請輸入正確的手機號碼)" ForeColor="Red" ValidationExpression="^09[0-9]{2}[0-9]{6}$" Font-Bold="True"></asp:RegularExpressionValidator>
&nbsp;<asp:TextBox ID="txtPhone" runat="server" CssClass="form-control" placeholder="請輸入 手機號碼"></asp:TextBox>                 
                </div>
                <div class="register-email">
                    <label><i class="glyphicon glyphicon-envelope"></i>&nbsp;&nbsp;電子信箱</label><asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="txtEmail" ErrorMessage="請輸入資料" ForeColor="#CC0000" Font-Bold="True" Display="Dynamic"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtEmail" Display="Dynamic" ErrorMessage="(請輸入正確的電子郵件)" ForeColor="Red" ValidationExpression="^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$" Font-Bold="True"></asp:RegularExpressionValidator>
&nbsp;<asp:TextBox ID="txtEmail" runat="server" CssClass="form-control" placeholder="請輸入 電子信箱"></asp:TextBox>                                     
                </div>
                <div class="register-btns">
                    <asp:Button ID="cmdClear" runat="server" Text="清除資料" CssClass="btn btn-success" OnClick="cmdClear_Click" CausesValidation="False" title="清除資料" UseSubmitBehavior="False" />
                    <div class="right-btn">
                    <asp:Button ID="cmdSend" runat="server" Text="送出" CssClass="btn btn-danger" OnClick="cmdSend_Click" title="送出" />
                    <asp:Button ID="cmdCancel" runat="server" Text="取消" CssClass="btn btn-default" OnClick="cmdCancel_Click" CausesValidation="False" title="取消" UseSubmitBehavior="False" />
                    </div>
                </div>
            </div>
        </div>
    </div>

     <%--必須參考--%>
    <link href="Content/bootstrap.min.css" rel="stylesheet" />
    <script src="Scripts/jquery-2.1.1.min.js"></script>
    <script src="Scripts/bootstrap.min.js"></script>
    <%--必須參考--%>

    <%--客製參考--%>
    <link href="Content/UserRegister.css" rel="stylesheet" />
    <script src="Scripts/UserRegister.js"></script>
    <%--客製參考--%>
      
    </form>
</body>
</html>
